Earth's rocks can be roughly divided into three types based on how they were formed: igneous, sedimentary and metamorphic. Sedimentary rock is where most fossils are found.
By looking at a cliff, you can see a number of different layers of rock. At the bottom of the cliff is a dark-colored metamorphic rock. No fossils are found in this layer because it has been heated to temperatures so high and put under such great pressure that any fossils which might have been in it would have been destroyed.
Directly above the metamorphic rock is a layer of sedimentary mudstone. This river-formed sedimentary rock is an excellent place to look for fossils. The mud which is now cemented together to form this layer was originally carried by slow-moving rivers.
The next layers are sedimentary sandstone: stone formed by cemented, wind-blown sand. It is uncommon to find dinosaur fossils in this type of sedimentary rock. Dinosaurs probably did not spend much time in deserts because of the lack of food and water. However, many dinosaur tracks are found in sedimentary sandstone. It seems they often crossed the deserts to get to watering holes or hunting grounds.
Another feature is a volcanic layer of basalt. This igneous rock almost never contains fossils because volcanoes or fissures deposit it directly onto Earth in the form of molten lava.
Any animals caught in the flow would have been incinerated. No bones would be left to preserve as fossils.
Very occasionally, however, the lava solidifies around an animal's body and makes a mold of it.